package HomeWork;

import java.util.Scanner;

public class efg {
    public static void main(String[] args) {

        Scanner scanner=new Scanner(System.in);
        System.out.println("您输入的是几位数");
        int a=scanner.nextInt();
        int num[]=new int[a];
        for (int i = 0; i <a; i++) {
            System.out.print("请逐一输入");
            int b=scanner.nextInt();
            num[i]=b;
        }
        for (int i = 0; i <num.length ; i++) {
            System.out.print(num[i]);
        }
        System.out.println();
        for (int i = a-1;i>=0 ; i--) {
            System.out.print(num[i]);
        }


    }
 }





